﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Kkc.Model.Page>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Encode(Model.Title) %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p><%= Model.Contents %></p>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="LeftSideContent" runat="server">
    <ul>
           <% if (Page.User.IsInRole("Contributor")) 
           {
               if (Model.Id == 0)
               {               
               %>
            <li class="first"><%= Html.ActionLink("Opprett siden", "Create", new { name = Model.Name })%></li>
            <% }
               else
               { %>
            <li class="first"><%= Html.ActionLink("Rediger siden", "Edit", new { name = Model.Name })%></li>
               <%
               } %>
        <% } %>
    </ul>
</asp:Content>

